package com.weichuang.ecommerce;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "spring.redis")
public class RedisConfigurationProperties {
	private int database;
	private String host;
	private int port;
	private String password;
	private int maxTotal;
	private int maxIdle;
	private int minIdle;
	private int maxActive;
	private int maxWait;
	private int maxWaitMillis;
	private boolean testOnBorrow;
	private boolean testOnReturn;
	
	public int getDatabase() {
		return database;
	}
	
	public void setDatabase(int database) {
		this.database = database;
	}
	
	public String getHost() {
		return host;
	}
	
	public void setHost(String host) {
		this.host = host;
	}
	
	public int getPort() {
		return port;
	}
	
	public void setPort(int port) {
		this.port = port;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public int getMaxIdle() {
		return maxIdle;
	}
	
	public void setMaxIdle(int maxIdle) {
		this.maxIdle = maxIdle;
	}
	
	public int getMinIdle() {
		return minIdle;
	}
	
	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}
	
	public int getMaxActive() {
		return maxActive;
	}
	
	public void setMaxActive(int maxActive) {
		this.maxActive = maxActive;
	}
	
	public int getMaxWait() {
		return maxWait;
	}
	
	public void setMaxWait(int maxWait) {
		this.maxWait = maxWait;
	}
	
	public int getMaxTotal() {
		return maxTotal;
	}
	
	public void setMaxTotal(int maxTotal) {
		this.maxTotal = maxTotal;
	}
	
	public int getMaxWaitMillis() {
		return maxWaitMillis;
	}
	
	public void setMaxWaitMillis(int maxWaitMillis) {
		this.maxWaitMillis = maxWaitMillis;
	}
	
	public boolean isTestOnBorrow() {
		return testOnBorrow;
	}
	
	public void setTestOnBorrow(boolean testOnBorrow) {
		this.testOnBorrow = testOnBorrow;
	}
	
	public boolean isTestOnReturn() {
		return testOnReturn;
	}
	
	public void setTestOnReturn(boolean testOnReturn) {
		this.testOnReturn = testOnReturn;
	}
}
